package com.mwt.oes.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @create: 2024-02-11 20:42
 **/
@Component
@ConfigurationProperties(prefix = "upload")
public class UploadConfig {
    /** 上传路径 */
    private static String profile;

    public static String getProfile()
    {
        return profile;
    }

    public void setProfile(String profile)
    {
        UploadConfig.profile = profile;
    }

    public static String getImportPath()
    {
        return profile + "/import";
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath()
    {
        return profile + "/avatar";
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath()
    {
        return profile + "/download/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return profile + "/upload";
    }
}
